//
//  ScrollViewViewController.m
//  ScrollView
//

#import "ScrollViewViewController.h"

@implementation ScrollViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	CGRect scrollFrame = CGRectMake(20, 90, 280, 280);
	UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:scrollFrame];
	UIImage *bigImage = [UIImage imageNamed:@"bigImage.png"];
	UIImageView *largeImageView = [[UIImageView alloc] initWithImage:bigImage];
	
	[scrollView addSubview:largeImageView];
	scrollView.contentSize = largeImageView.frame.size; // 중요!
	
	[self.view addSubview:scrollView];
	
	[scrollView release];
}

- (void)dealloc {
    [super dealloc];
}

@end
